Function as a service (faas) execution distributor

ABSTRACT

The disclosure provides an approach for distribution of functions among data centers of a cloud system that provides function-as-a-service (FaaS). For example, the disclosure provides one or more function distributors configured to receive a request for loading or executing a function, automatically determine an appropriate data center to load or execute the function, and automatically load or execute the function on the determined data center. In certain embodiments, the function distributors are further configured to determine an appropriate data center to provide storage resources for the function and configure the function to utilize the storage resources of the determined data center.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.16/214,163, filed Dec. 10, 2018, which claims priority to IndiaProvisional Patent Application No. 201841030859, filed Aug. 17, 2018.The entire contents of each of these applications are herebyincorporated by reference in their entirety.

BACKGROUND

Cloud architectures are used in cloud computing and cloud storagesystems (referred to as cloud systems) for offeringfunction-as-a-service (FaaS) cloud services. Such cloud systems canrefer to any type of cloud system such as a private cloud system, publiccloud system, or hybrid cloud system. A FaaS cloud service is a type ofcloud service that provides a platform to develop, run, and manageapplication functions on the infrastructure provided by a cloud system.For example, the cloud system can provide computing resources (e.g.,servers, hosts, virtual computing instances (VCIs) such as virtualmachines (VMs) running on hosts, etc.) as well as storage resources(e.g., networked storage, storage coupled to physical devices, a virtualstorage area network, etc.) for executing the functions. Storageresources in a cloud system may include a cloud-based object store ordatabase.

An application function, or function as referred to herein, refers to apiece of code that can be executed using resources of the cloud system.For example, a function may be code that takes an input and provides anoutput. The execution of the function on the resources of the cloudsystem allows the function to be developed and launched without thecomplexity of managing the resources needed to support the execution ofthe function. Instead, the cloud system provides and maintains suchresources, including compute resources and storage resources forexecuting the function.

Beneficially, FaaS cloud services provided by a cloud system allowdevelopers to scale the execution of application functions more easilythan with traditional computing models. For example, typically amonolithic application may include code for executing several functions.In order to scale the use of the monolithic application, many instancesof the monolithic application may need to be executed and physicalarchitecture such as servers provided to support such execution.However, using FaaS cloud services, a developer can split the monolithicapplication into a number of functions. Such functions can be executedindependently of one another. Further, execution of each of thesefunctions can be scaled automatically and independently in the cloudsystem. For example, more of the resources of the cloud system can beprovided to execute functions as needed.

Cloud systems can include multiple data centers. A data center includesa plurality of physical computing devices (e.g., servers, hosts, hostsrunning VCIs, etc.) that are interconnected utilizing physicalnetworking equipment (e.g., physical routers, physical switches, etc.)over a local network. A data center may further include storage (e.g.,coupled to one or more of the physical computing devices). The multipledata centers may further be interconnected via a network (e.g., theInternet). Typically, data centers of a cloud system are located indifferent physical regions. For example, a cloud system may have datacenters located in different countries or in different regions of acountry (e.g., East United States, West United States, etc.). Some datacenters can provide both compute resources and storage resources tousers of the cloud system. Some data centers can provide only computeresources to users of the cloud system. Some data centers can provideonly storage resources to users of the cloud system.

A developer can load/deploy a function into a cloud system. For example,the cloud system can provide application programming interfaces (APIs)that a developer accesses (e.g., using a web browser running on acomputing device) to load functions into the cloud system, such as overa network. The function may be loaded into a data center specified bythe developer. In particular, the developer may have to manually choosewhich data center of the cloud system to load the function into.Further, within the data center, the function may be loaded onto one ormore of the compute resources in the data center. Accordingly, thefunction is executable by one or more compute resources of the datacenter.

The function can be called/triggered to execute based on a variety ofdifferent triggers. For example, the function can be triggered by anapplication running on a client device (e.g., a computing device such asa mobile device, workstation, server, etc.), another function running inthe same data center of the cloud system, a different data center of thecloud system, or another cloud system, another service operating in thecloud system, an event occurring in the cloud system (e.g., a timerexpiring, a file being uploaded to storage of the cloud system, etc.),etc.

In one example, the data center into which the function is loadedincludes an API gateway that can trigger execution of the function. TheAPI gateway corresponds to one or more computing resources of the datacenter accessible over a network, such as the Internet. The API gatewaymay be associated with a uniform resource locator (URL). An applicationrunning on a client device can establish an HTTP session (e.g., using anunderlying transport layer such as TCP) with the API gateway over thenetwork based on the URL of the API gateway. The application can thenexchange HTTP requests and HTTP responses with the API gateway totrigger execution of the function. Though certain aspects are describedwith respect to establishing an HTTP session and utilizing HTTP requestsand HTTP responses, it should be noted that similarly an HTTPS sessioncan be established and HTTPS requests and HTTPS responses utilized. Forexample, an HTTP request to execute the function can be generated by theapplication and sent to the API gateway over the established HTTPsession. The HTTP request includes information indicative of a requestto execute the function. The HTTP request can further include inputparameters (e.g., variables, strings, etc.) to be passed to the functionas input for execution.

The API gateway receives the HTTP request, and then further selects acomputing resource of the data center that includes a copy of thefunction to handle the request (e.g., based on a load balancingfunction). Accordingly, the computing resource receives the request andexecutes the function based on the request from the client. The executedfunction may return information to the application (e.g., in a HTTPresponse sent over the internet to the application), read/write data instorage, trigger execution of another function, etc.

Each data center of a cloud system has its own API gateway associatedwith its own URL. Accordingly, for an application to establish an HTTPsession and generate an HTTP request to execute a function, theapplication is hardcoded with the URL of the desired API gateway tohandle the request, and accordingly, hardcoded with the data center usedto execute the function.

Similarly, in another example, a function running in the cloud systemcan trigger another function. For example, the cloud system can providein its APIs for developing a function, the ability to call anotherfunction. For a function to call another function, it has to specifywhich data center the other function is located in, and accordingly, ishardcoded with the data center used to execute the other function. Forexample, the function may call another function by establishing an HTTPsession with and sending an HTTP request to the API gateway of the datacenter including the function as discussed.

Further, if a function utilizes persistent storage, such as storageresources of the cloud system, the function is hardcoded with thelocation of the storage, such as an identifier of the data center inwhich the storage is located.

In order to reduce network latency between code (e.g., a function,application, etc.) triggering execution of a function and the functionitself, the code can be hardcoded to execute the function in a datacenter that is geographically close to the computing device executingthe code. Further, to reduce network latency between the function andstorage utilized by the function, the function itself can be hardcodedto utilize storage in a data center that is geographically close to thedata center executing the function. In particular, the less geographicaldistance between computing devices, typically the lower the latency ofnetwork communication between the devices. For example, if a developerknows that the code that triggers execution of a function is going torun on a computing device located in the western part of the UnitedStates, the developer can load the function onto a data center in thewestern part of the United States. Further, the developer hardcodes inthe code a trigger for the function that triggers execution of thefunction on the data center in the western part of the United States. Ifthe function itself uses persistent storage, the developer can hardcodethe function to utilize storage resources of the same data center thatexecutes the function if it has available storage resources, or anotherdata center with storage resources that is geographically close to thedata center that executes the function.

However, hardcoding of the data centers for executing functions in codeor hardcoding of the data centers providing storage for functions asdiscussed can reduce flexibility for changing conditions. For example, acomputing device executing code that triggers execution of a functioncan move locations. Further, a cloud system can add new data centers.Accordingly, the closest data center geographically to the code orfunction may no longer be the same one that is hardcoded. This cannegatively impact network latency between the computing device executingthe code and the computing device executing the function, or between acomputing device executing the function and the storage.

SUMMARY

A method described herein provides for executing a function in a datacenter of a cloud computing system comprising a plurality of datacenters, each of the plurality of data centers comprising one or morecompute resources. The method includes receiving, at a functiondistributor from an application, a request to execute the function, therequest comprising an identifier of the function. The method furtherincludes selecting, by the function distributor, a first data center ofthe plurality of data centers to execute the function. The methodfurther includes causing, by the function distributor, the first datacenter to execute the function.

Further embodiments include a non-transitory computer-readable storagemedium storing instructions that, when executed by a computer system,cause the computer system to perform the method set forth above, and acomputer system programmed to carry out the method set forth above.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 depicts a block diagram of a cloud system in which one or moreembodiments of the present disclosure may be utilized.

FIG. 2 depicts a flow diagram of a method of handling a request to loada function into a cloud system at a function distributor, accordingly toan embodiment.

FIG. 3 depicts a flow diagram of a method of handling a request toexecute a function loaded in a cloud system at a function distributor,accordingly to an embodiment.

FIG. 4 depicts a flow diagram of a method of handling a request forstorage resources in a cloud system at a function distributor,accordingly to an embodiment.

To facilitate understanding, identical reference numerals have beenused, where possible, to designate identical elements that are common tothe figures. It is contemplated that elements disclosed in oneembodiment may be beneficially utilized on other embodiments withoutspecific recitation.

DETAILED DESCRIPTION

The disclosure provides techniques for distribution of functions amongdata centers of a cloud system that provides FaaS. For example, thedisclosure provides one or more function distributors configured toreceive a request for loading or executing a function, automaticallydetermine an appropriate data center to load or execute the function,and automatically load or execute the function on the determined datacenter. In certain embodiments, the function distributors are furtherconfigured to determine an appropriate data center to provide storageresources for the function and configure the function to utilize thestorage resources of the determined data center.

The disclosure provides a number of advantages over the prior art. Inparticular, the function distributors allow for dynamic selection of adata center to load and execute a function and/or provide storageresources to a function. Accordingly, the selection of a data centerdoes not need to be hardcoded into the code calling the function or in afunction utilizing storage resources. Therefore, if a location of adevice executing the code changes, or a new data center is added to acloud system, the function distributor can automatically select adifferent data center for the code/function that provides reducednetwork latency, such as a data center close to the executingcode/function. Thus, the disclosure provides a technical solutionthrough function distributors to the technical problem of networklatency issues in cloud systems providing FaaS.

FIG. 1 depicts a block diagram of a cloud system 100 in which one ormore embodiments of the present disclosure may be utilized. Cloud system100 includes a plurality of data centers 102. In certain embodiments,each of the data centers 102 is associated with a different region(e.g., West United States, East United States, East India, West India,etc.). Certain aspects of the plurality of data centers 102 arediscussed with respect to a singular data center 102, but are applicableto each of the plurality of data centers 102.

Cloud system 100 may be a private cloud system, a public cloud system,or a hybrid cloud system. A private cloud system includes one or moredata centers controlled and administrated by a particular enterprise orbusiness organization. A public cloud system includes one or more datacenters operated by a cloud computing service provider and exposed as aservice available to account holders, such as the particular enterprisein addition to other enterprises. A hybrid cloud system includes bothtypes of data centers. Accordingly, as used herein, an internal cloud or“private” cloud is a cloud in which a tenant and a cloud serviceprovider are part of the same organization, while an external or“public” cloud is a cloud that is provided by an organization that isseparate from a tenant that accesses the external cloud. For example,the tenant may be part of an enterprise, and the external cloud may bepart of a cloud service provider that is separate from the enterprise ofthe tenant and that provides cloud services to different enterprisesand/or individuals. A hybrid cloud is a cloud architecture in which atenant is provided with seamless access to both private cloud resourcesand public cloud resources.

Data center 102 includes one or more physical computing devices(“computing devices 104”). A computing device 104 may includeconventional components of a computing device, such as one or moreprocessors (CPUs) 108, system memory 110, a network interface 112,storage system 114, and other I/O devices such as, for example, USB andVGA interfaces (not shown). CPU 108 is configured to executeinstructions, for example, executable instructions, functions, or codethat cause CPU 108 to perform one or more operations, such as describedherein, and may be stored in memory 110 and in local storage. Memory 110is a device allowing information, such as executable instructions,applications, functions, code, and other data, to be stored andretrieved. Memory 110 may include, for example, one or more randomaccess memory (RAM) modules. Network interface 112 enables computingdevice 104 to communicate with another device via a communicationmedium, such as a network 122 within data center 102. Network interface112 may comprise one or more network interface devices, also referred toas Network Interface Cards (NICs). Storage system 114 represents localstorage devices (e.g., one or more hard disks, flash memory modules,solid state disks, and optical disks) and/or a storage interface thatenables computing device 104 to communicate with one or more networkdata storage systems. Examples of a storage interface are a host busadapter (HBA) that couples computing device 104 to one or more storagearrays (not shown) such as a storage area network (SAN), a distributedvirtual SAN, or a network-attached storage (NAS), as well as othernetwork data storage systems. Centralized storage arrays can also beaccessed via network 122 using iSCSI drivers. Though not shown, acomputing device 104 can include a virtualization layer (e.g.,hypervisor) that abstracts processor, memory, storage, and networkingresources computing device 104 into multiple VCIs (e.g., VMs,containers, etc.).

Computing devices 104 or VCIs running on the computing devices 104 canexecute code or functions as discussed herein. Accordingly, computingdevices 104 correspond to computing resources of data center 102 andcloud system 100.

Further, storage systems 114 present on computing devices 104 or otherstorage arrays (not shown) accessible on network 122 can store data forfunctions as discussed herein. Accordingly, storage systems 114 andother storage arrays correspond to storage resources of data center 102and cloud system 100.

Data center 102 further includes a gateway 124. Gateway 124 providescomputing devices 104 and VCIs running on computing devices 104 withconnectivity to external network 146 (e.g., the Internet). Gateway 124may manage external public IP addresses for computing devices 104 androute traffic incoming to and outgoing from data center 102 and providenetworking services, such as firewalls, network address translation(NAT), dynamic host configuration protocol (DHCP), and load balancing.Gateway 124 may use network 122 to transmit network packets to computingdevices 104. Gateway 124 may be a VCI, a physical device, a softwaremodule running within computing device 104, etc. Though shown as asingle component, the functionality of gateway 124 may be distributedacross multiple VCIs and/or physical devices. Gateway 124 corresponds toan API gateway, as discussed, and is associated with its own URL. Inparticular, each gateway 124 of each data center 102 is associated withits own URL. Each of the data centers 102 of cloud system 100,accordingly, is coupled to external network 146 via gateway 124, andassociated with a different URL corresponding to the URL of its gateway124.

Client device 150 is connected to external network 146 (e.g., directlyvia a NIC, via another gateway, etc.). Client device 150 corresponds toa device used by a user (e.g., developer) to access FaaS provided bycloud system 100. Client device 150 may be a device similar to computingdevice 104, a mobile device, a VCI, another computing device, software(e.g., a browser) running on a computing device, etc. Though only oneclient device 150 is shown, many client devices 150 can be connected tonetwork 146 and access FaaS provided by cloud system 100. A clientdevice 150 may be external to, or part of cloud system 100.

Function distributor 160 is also connected to external network 146.Function distributor 160 corresponds to a device configured todistribute functions among data centers 102 of cloud system 100 asfurther discussed herein. Function distributor 160 stores connectioninformation (e.g., URLs) associated with each of data centers 102 sothat it can establish connections with each of data centers 102.Further, function distributor 160 stores information indicative of alocation of each of the data centers 102 so that it can distributefunctions among data centers 102 based on location of the data centers102. Function distributor 160 can be implemented as a VCI, a physicaldevice, a software module running within a computing device 104, etc.Though shown as a single component, the functionality of functiondistributor 160 may be distributed across multiple VCIs and/or physicaldevices. Function distributor 160 can be external to, or part of cloudsystem 100. Function distributor 160 may be external to data centers 102or part of one or more data centers 102. Like gateway 124, in certainembodiments, function distributor 160 is associated with its own URL. Itshould be noted that one function distributor 160 can be configured towork with one cloud system, or many different cloud systems of the sameor different types.

FIG. 2 depicts a flow diagram of a method 200 of handling a request toload a function into a cloud system at a function distributor,accordingly to an embodiment. Method 200 is described with respect tocloud system 100 of FIG. 1.

At block 202, client device 150 generates and sends a data centeragnostic request to load a function onto cloud system 100 to functiondistributor 160 over network 146. The request is data center agnostic inthat it does not specify a data center 102 on which to load thefunction. In certain embodiments, the data center agnostic request isassociated with a URL of the function distributor 160 and therefore issent to the function distributor 160. In certain embodiments, the clientdevice 150 establishes an HTTP session with the function distributor 160based on the URL of the function distributor 160. The client device 150then exchanges HTTP requests and HTTP responses with the functiondistributor 160 to send data corresponding to the function to functiondistributor 160 requesting the function be loaded onto cloud system 100.

At block 204, the function distributor 160 receives the data centeragnostic request to load a function onto cloud system 100 and determinesa set of data centers 102 to distribute the function. In one example,the function distributor 160 determines the set of data centers 102 tobe all data centers 102 of cloud system 100 with compute resources toexecute functions. In another example, the function distributor 160determines the set of data centers 102 based on an indication in thedata center agnostic request of the set of data centers 102. In yetanother example, the function distributor 160 determines the set of datacenters 102 to be less than all data centers 102 of cloud system 100.

In certain embodiments, the function distributor 160 further storesinformation associating an identifier of the function with the set ofdata centers 102, so that the function distributor 160 can determine onwhich set of data centers 102 the function is loaded.

At block 206, the function distributor 160 distributes the function toeach of the set of data centers 102 over network 146 and the function isloaded on each of the data centers 102. In one example, functiondistributor 160 has root access to each of the data centers 102, meaningit has access to and connection information for platform managementdevices in each of the data centers 102 responsible for loadingfunctions onto computing devices 104 of the data center 102. Thefunction distributor 160 accordingly sends requests (e.g., using anyappropriate communication protocol such as HTTP, TCP, etc.) to load thefunction to platform management devices of each of the data centers 102over network 146. The platform management device in each data centerthen loads the function onto computing devices 104 of the data center102.

In another example, function distributor 160 is configured to interactwith datacenters 102 in the same manner as an end user would to load thefunction onto each of the data centers 102. For instance, for each datacenter 102, the function distributor 160 can interface with the APIsprovided by the cloud system 100 over network 146 to load the functiononto the data center.

Accordingly, the function distributor 160 automatically loads a functiononto a plurality of data centers of a cloud system, instead of a userloading a function onto one specific data center specified by the user.

FIG. 3 depicts a flow diagram of a method 300 of handling a request toexecute a function loaded in a cloud system at a function distributor,accordingly to an embodiment. Method 300 is described with respect tocloud system 100 of FIG. 1.

At block 302, function distributor 160 receives a request to execute afunction loaded on cloud system 100. For example, function distributor160 receives the request from an application, which can refer to anotherfunction, an application executing on client device 150, etc. Thefunction distributor 160 receives the request over network 146.

In one example, the application includes instructions that call forexecution of the function. The instructions that call for execution ofthe function, instead of specifying a URL of a particular data center102, include the URL of function distributor 160 and an identifier ofthe function. Accordingly, the application establishes an HTTP sessionwith function distributor 160. The application further generates an HTTPrequest to execute the function and sends the HTTP request to thefunction distributor 160. The HTTP request may further include theidentifier of the function (e.g., as part of the URL).

At block 304, the function distributor 160 selects a data center 102 incloud system 100 to execute the function. For example, the functiondistributor 160 determines the set of data centers 102 that have thefunction loaded based on information stored at the function distributor160 and the received identifier of the function. The functiondistributor 160 then selects one of the set of data centers 102 toexecute the function.

In one example, the function distributor 160 selects the data center 102of the set of data centers 102 that is geographically closest to thelocation where the application is running. The function distributor 160accordingly determines a location where the application is running. Inone example, the function distributor 160 determines the applicationlocation based on an address (e.g., IP address) included in the requestto execute the function (e.g., HTTP request). In another example, theapplication explicitly includes geolocation information (e.g., GPScoordinates) associated with the application in the request to executethe function. The function distributor 160 can determine the applicationlocation based on the geolocation information.

As discussed, the function distributor 160 further stores informationindicative of a location of each of the data centers 102. Based on theinformation indicative of a location of each of the data centers 102,and the application location, the function distributor 160 determinesand selects the data center 102 of the set of data centers 102 that isgeographically closest to the location where the application is running.

In certain embodiments, the function distributor 160 may choose toexecute the function in a data center 102 that does not have thefunction loaded. For example, the function distributor 160 may determinethat all the data centers 102 that have the function loaded aregeographically distant from the location where the application isrunning, or that the data centers 102 having the function loaded areunavailable. Accordingly, the function distributor 160 may first loadthe function on one or more additional data centers 102, such asaccording to method 200, and then select one of the one or moreadditional data centers 102 to execute the function. Thus, in certainembodiments, the function distributor 160 can load functions intoadditional data centers 102 at different times.

At block 306, the function distributor 160 redirects the application tothe selected data center 102. In particular, the function distributor160 sends information over network 146 to the application that it shouldutilize the selected data center 102 to request execution of thefunction. In one example, function distributor 160 sends an HTTPresponse over network 146 to the application to redirect the applicationto the selected data center 102. The HTTP response may be a code 301 orcode 302 to perform URL redirection.

At block 308, the application sends a request to execute the function tothe selected data center 102. In certain embodiments, the applicationsends the request over network 146. For example, the code in theapplication that calls the function may still specify the URL associatedwith the function distributor 160. However, based on the URL redirectionby the function distributor 160, the application now associates the URLwith the selected data center 102. Accordingly, the applicationestablishes an HTTP session with selected data center 102. Theapplication further generates an HTTP request to execute the functionand sends the HTTP request to the selected data center 102.

At block 310, the selected data center 102 executes the function.

Accordingly, the function distributor 160 automatically selects a datacenter to execute a function such as based on proximity of the datacenter, instead of an application being tied to using a single datacenter to execute the function.

In certain aspects, the function distributor 160 may also perform aclean up function and delete functions from data centers 102. Forexample, if the function distributor 160 determines that it has notselected a particular data center 102 to execute a particular functionfor a threshold period of time (e.g., days, months, years), the functiondistributor 160 may delete the particular function from the particulardata center 102 (e.g., using root access or APIs as discussed). Incertain aspects, a developer can indicate to the function distributor160 to delete a particular function and the function distributor 160 candelete the function from the corresponding data centers 102 that includethe function.

FIG. 4 depicts a flow diagram of a method 400 of handling a request forstorage resources in a cloud system at a function distributor,accordingly to an embodiment. Method 400 is described with respect tocloud system 100 of FIG. 1.

At block 402, function distributor 160 receives a request for storageresources on cloud system 100. For example, function distributor 160receives the request from a function executing in a data center 102 overnetwork 146.

In one example, the function includes instructions that call for using(e.g., reading/writing) storage resources of cloud system 100. Theinstructions that call for using storage resources, instead ofspecifying a location of storage resources in a particular data center102, include a pointer to function distributor 160 (e.g., the URL offunction distributor 160) and global/generic identifiers of storagelocations across data centers 102.

For example, a data center 102 may include storage resources in the formof a database that includes a plurality of buckets corresponding tostorage locations. Each of the buckets is associated with an identifierunique within the data center 102, but which may not be unique acrossdata centers 102. When a function is hardcoded to use the storageresources of a particular data center 102, the instructions that callfor using the storage resources may point to the specific data center102, and include identifiers of storage locations that are used withinthe data center 102 to use the specific storage locations of the storageresources. Therefore, the function is limited to using the hardcodedstorage locations in the specific data center 102.

However, a function according to embodiments of the present disclosurecan include a pointer to function distributor 106 and global identifiersof storage locations across data centers 102. The function distributor106 can then redirect the function to use storage resources of aparticular data center 102 and translate the global identifiers toidentifiers of specific storage locations in the data center 102 asfurther discussed herein.

In some embodiments, the function establishes an HTTP session withfunction distributor 160 based on the URL of function distributor 160being included in instructions of the function. The function furthergenerates an HTTP request to use storage resources of cloud system 100and sends the HTTP request to the function distributor 160.

At block 404, the function distributor 160 selects a data center 102 incloud system 100 to use the storage resources of. For example, thefunction distributor 160 selects a data center 102 that provides storageresources that is closest geographically to the function, similar to asdiscussed with respect to block 304.

At block 406, the function distributor 160 redirects the function to theselected data center 102. In particular, the function distributor 160sends information over network 146 to the function that it shouldutilize the selected data center 102 for storage resources. In oneexample, function distributor 160 sends an HTTP response over network146 to the function to redirect the function to the selected data center102. The HTTP response may be a code 301 or code 302 to perform URLredirection. The HTTP response may further include a translation ofglobal identifiers of storage locations to identifiers of specificstorage locations in the selected data center 102.

At block 408, the function sends a request to use storage resources tothe selected data center 102. In certain embodiments, the function sendsthe request over network 146. For example, the code in the function maystill specify the URL associated with the function distributor 160.However, based on the URL redirection by the function distributor 160,the function now associates the URL with the selected data center 102.Accordingly, the function establishes an HTTP session with selected datacenter 102. The function further generates an HTTP request to usestorage resources and sends the HTTP request to the selected data center102. In some embodiments, the function includes in the HTTP request theidentifiers of specific storage locations in the selected data center102 received from function distributor 160.

At block 410, the selected data center 102 provides storage resources tothe function.

Accordingly, the function distributor 160 automatically selects a datacenter to provide storage resources such as based on proximity of thedata center, instead of a function being tied to using a single datacenter for storage resources.

It should be understood that, for any process described herein, theremay be additional or fewer steps performed in similar or alternativeorders, or in parallel, within the scope of the various embodiments,consistent with the teachings herein, unless otherwise stated.

The various embodiments described herein may employ variouscomputer-implemented operations involving data stored in computersystems. For example, these operations may require physical manipulationof physical quantities—usually, though not necessarily, these quantitiesmay take the form of electrical or magnetic signals, where they orrepresentations of them are capable of being stored, transferred,combined, compared, or otherwise manipulated. Further, suchmanipulations are often referred to in terms, such as producing,identifying, determining, or comparing. Any operations described hereinthat form part of one or more embodiments of the invention may be usefulmachine operations. In addition, one or more embodiments of theinvention also relate to a device or an apparatus for performing theseoperations. The apparatus may be specially constructed for specificrequired purposes, or it may be a general purpose computer selectivelyactivated or configured by a computer program stored in the computer. Inparticular, various general purpose machines may be used with computerprograms written in accordance with the teachings herein, or it may bemore convenient to construct a more specialized apparatus to perform therequired operations.

The various embodiments described herein may be practiced with othercomputer system configurations including hand-held devices,microprocessor systems, microprocessor-based or programmable consumerelectronics, minicomputers, mainframe computers, application specificintegrated circuits (ASICs), field-programmable gate arrays (FPGAs), andthe like.

One or more embodiments of the present invention may be implemented asone or more computer programs or as one or more computer program modulesembodied in one or more computer readable media. The term computerreadable medium refers to any data storage device that can store datawhich can thereafter be input to a computer system—computer readablemedia may be based on any existing or subsequently developed technologyfor embodying computer programs in a manner that enables them to be readby a computer. Examples of a computer readable medium include a harddrive, network attached storage (NAS), read-only memory, random-accessmemory (e.g., a flash memory device), a CD (Compact Discs)—CD-ROM, aCD-R, or a CD-RW, a DVD (Digital Versatile Disc), a magnetic tape, andother optical and non-optical data storage devices. The computerreadable medium can also be distributed over a network coupled computersystem so that the computer readable code is stored and executed in adistributed fashion.

Although one or more embodiments of the present invention have beendescribed in some detail for clarity of understanding, it will beapparent that certain changes and modifications may be made within thescope of the claims. Accordingly, the described embodiments are to beconsidered as illustrative and not restrictive, and the scope of theclaims is not to be limited to details given herein, but may be modifiedwithin the scope and equivalents of the claims. In the claims, elementsand/or steps do not imply any particular order of operation, unlessexplicitly stated in the claims.

Virtualization systems in accordance with the various embodiments may beimplemented as hosted embodiments, non-hosted embodiments or asembodiments that tend to blur distinctions between the two, are allenvisioned. Furthermore, various virtualization operations may be whollyor partially implemented in hardware. For example, a hardwareimplementation may employ a look-up table for modification of storageaccess requests to secure non-disk data.

Certain embodiments as described above involve a hardware abstractionlayer on top of a host computer. The hardware abstraction layer allowsmultiple contexts to share the hardware resource. In one embodiment,these contexts are isolated from each other, each having at least a userapplication running therein. The hardware abstraction layer thusprovides benefits of resource isolation and allocation among thecontexts. In the foregoing embodiments, virtual machines are used as anexample for the contexts and hypervisors as an example for the hardwareabstraction layer. As described above, each virtual machine includes aguest operating system in which at least one application runs. It shouldbe noted that these embodiments may also apply to other examples ofcontexts, such as containers not including a guest operating system,referred to herein as “OS-less containers” (see, e.g., www.docker.com).OS-less containers implement operating system-level virtualization,wherein an abstraction layer is provided on top of the kernel of anoperating system on a host computer. The abstraction layer supportsmultiple OS-less containers each including an application and itsdependencies. Each OS-less container runs as an isolated process inuserspace on the host operating system and shares the kernel with othercontainers. The OS-less container relies on the kernel's functionalityto make use of resource isolation (CPU, memory, block I/O, network,etc.) and separate namespaces and to completely isolate theapplication's view of the operating environments. By using OS-lesscontainers, resources can be isolated, services restricted, andprocesses provisioned to have a private view of the operating systemwith their own process ID space, file system structure, and networkinterfaces. Multiple containers can share the same kernel, but eachcontainer can be constrained to only use a defined amount of resourcessuch as CPU, memory and I/O. The term “virtualized computing instance”as used herein is meant to encompass both VMs and OS-less containers.

Many variations, modifications, additions, and improvements arepossible, regardless the degree of virtualization. The virtualizationsoftware can therefore include components of a host, console, or guestoperating system that performs virtualization functions. Pluralinstances may be provided for components, operations or structuresdescribed herein as a single instance. Boundaries between variouscomponents, operations and data stores are somewhat arbitrary, andparticular operations are illustrated in the context of specificillustrative configurations. Other allocations of functionality areenvisioned and may fall within the scope of the invention(s). Ingeneral, structures and functionality presented as separate componentsin exemplary configurations may be implemented as a combined structureor component. Similarly, structures and functionality presented as asingle component may be implemented as separate components. These andother variations, modifications, additions, and improvements may fallwithin the scope of the appended claim(s).

We claim:
 1. A method of handling a request for at least one storageresource of a cloud computing system comprising a plurality of datacenters, each of the plurality of data centers comprising one or morestorage resources, the method comprising: receiving, at a functiondistributor from an application, a request for at least one storageresource, the request comprising one or more global identifiers of oneor more storage locations across the plurality of data centers;selecting, by the function distributor, a data center to provide the atleast one storage resource; translating the one or more globalidentifiers to one or more identifiers of one or more specific storagelocations in the data center; and causing, by the function distributor,the application to utilize the at least one storage resource of the datacenter based on the one or more identifiers of the one or more specificstorage locations.
 2. The method of claim 1, wherein causing theapplication to utilize the at least one storage resource of the datacenter comprises: redirecting, by the function distributor, theapplication to the data center causing the application to send a secondrequest including the one or more identifiers to the data center, thedata center providing the at least one storage resource based onreceiving the second request.
 3. The method of claim 2, wherein theapplication comprises instructions that call for using the at least onestorage resource, the instructions comprising a uniform resource locator(URL) associated with the function distributor and not the data center,and wherein redirecting the application comprises: sending, by thefunction distributor, an HTTP response or HTTPS response to theapplication to perform URL redirection of the URL to the data center. 4.The method of claim 1, wherein the request further comprises informationindicative of a location of where the application is running, andwherein selecting the data center is based on a location of the datacenter and the location of where the application is running.
 5. Themethod of claim 1, wherein the application comprises a function runningin a second data center.
 6. The method of claim 1, further comprising:loading, by the function distributor, a function on multiple datacenters of the plurality of data centers prior to receiving a secondrequest to execute the function; receiving, at the function distributorfrom the application, the second request; selecting, by the functiondistributor, a second data center of the multiple data centers toexecute the function based on the multiple data centers having thefunction loaded prior to receiving the second request; and causing, bythe function distributor, the second data center to execute thefunction.
 7. The method of claim 6, wherein causing the second datacenter to execute the function comprises: redirecting, by the functiondistributor, the application to the second data center causing theapplication to send a third request to execute the function to thesecond data center, the second data center executing the function basedon receiving the third request.
 8. A non-transitory computer readablemedium comprising instructions to be executed in a computer system,wherein the instructions when executed in the computer system perform amethod of handling a request for at least one storage resource of acloud computing system comprising a plurality of data centers, each ofthe plurality of data centers comprising one or more storage resources,the method comprising: receiving, at a function distributor from anapplication, a request for at least one storage resource, the requestcomprising one or more global identifiers of one or more storagelocations across the plurality of data centers; selecting, by thefunction distributor, a data center to provide the at least one storageresource; translating the one or more global identifiers to one or moreidentifiers of one or more specific storage locations in the datacenter; and causing, by the function distributor, the application toutilize the at least one storage resource of the data center based onthe one or more identifiers of the one or more specific storagelocations.
 9. The non-transitory computer readable medium of claim 8,wherein causing the application to utilize the at least one storageresource of the data center comprises: redirecting, by the functiondistributor, the application to the data center causing the applicationto send a second request including the one or more identifiers to thedata center, the data center providing the at least one storage resourcebased on receiving the second request.
 10. The non-transitory computerreadable medium of claim 9, wherein the application comprisesinstructions that call for using the at least one storage resource, theinstructions comprising a uniform resource locator (URL) associated withthe function distributor and not the data center, and whereinredirecting the application comprises: sending, by the functiondistributor, an HTTP response or HTTPS response to the application toperform URL redirection of the URL to the data center.
 11. Thenon-transitory computer readable medium of claim 8, wherein the requestfurther comprises information indicative of a location of where theapplication is running, and wherein selecting the data center is basedon a location of the data center and the location of where theapplication is running.
 12. The non-transitory computer readable mediumof claim 8, wherein the application comprises a function running in asecond data center.
 13. The non-transitory computer readable medium ofclaim 8, wherein the method further comprises: loading, by the functiondistributor, a function on multiple data centers of the plurality ofdata centers prior to receiving a second request to execute thefunction; receiving, at the function distributor from the application,the second request; selecting, by the function distributor, a seconddata center of the multiple data centers to execute the function basedon the multiple data centers having the function loaded prior toreceiving the second request; and causing, by the function distributor,the second data center to execute the function.
 14. The non-transitorycomputer readable medium of claim 13, wherein causing the second datacenter to execute the function comprises: redirecting, by the functiondistributor, the application to the second data center causing theapplication to send a third request to execute the function to thesecond data center, the second data center executing the function basedon receiving the third request.
 15. A function distributor configured toperform a method of handling a request for at least one storage resourceof a cloud computing system comprising a plurality of data centers, eachof the plurality of data centers comprising one or more storageresources, the method comprising: receiving, at the function distributorfrom an application, a request for at least one storage resource, therequest comprising one or more global identifiers of one or more storagelocations across the plurality of data centers; selecting, by thefunction distributor, a data center to provide the at least one storageresource; translating the one or more global identifiers to one or moreidentifiers of one or more specific storage locations in the datacenter; and causing, by the function distributor, the application toutilize the at least one storage resource of the data center based onthe one or more identifiers of the one or more specific storagelocations.
 16. The function distributor of claim 15, wherein causing theapplication to utilize the at least one storage resource of the datacenter comprises: redirecting, by the function distributor, theapplication to the data center causing the application to send a secondrequest including the one or more identifiers to the data center, thedata center providing the at least one storage resource based onreceiving the second request.
 17. The function distributor of claim 16,wherein the application comprises instructions that call for using theat least one storage resource, the instructions comprising a uniformresource locator (URL) associated with the function distributor and notthe data center, and wherein redirecting the application comprises:sending, by the function distributor, an HTTP response or HTTPS responseto the application to perform URL redirection of the URL to the datacenter.
 18. The function distributor of claim 15, wherein the requestfurther comprises information indicative of a location of where theapplication is running, and wherein selecting the data center is basedon a location of the data center and the location of where theapplication is running.
 19. The function distributor of claim 15,wherein the method further comprises: loading, by the functiondistributor, a function on multiple data centers of the plurality ofdata centers prior to receiving a second request to execute thefunction; receiving, at the function distributor from the application,the second request; selecting, by the function distributor, a seconddata center of the multiple data centers to execute the function basedon the multiple data centers having the function loaded prior toreceiving the second request; and causing, by the function distributor,the second data center to execute the function.
 20. The functiondistributor of claim 19, wherein causing the second data center toexecute the function comprises: redirecting, by the functiondistributor, the application to the second data center causing theapplication to send a third request to execute the function to thesecond data center, the second data center executing the function basedon receiving the third request.